# 单双引号合用
print("输出一个中文:'你好'")
print("------------------")

# 转义字符
print("1\t2")    # \t tab键
print("1\n2")    # \n 换行
print("------------------")

# 字符串拼接
name = "刘"
age = "18"
print("你好，",name)
print("你好,"+name)
print("刘的年龄:"+str(age)+"岁")
print("------------------")

# %占位形式    %s将变量变成字符串  %d将变量变成整型输出  %f float
date = "5.23"
print("今天日期是:%s"%date)

score = 90.3
print("语文成绩是:%d分" %score)
print("成绩是:%f分"%score)
print("变量score的数据类型是%s?" %(type(score)))
print('-----------------------')

# %还可进行小数点精度的控制
num = 9.9999999999
print("控制小数点精准度为2位:%.2f"%num)
num1 = 3.1415926
print("控制小数点精度为3位:%.3f"%num1)
print('-----------------------')

# f-string
